Skip to content

Add a new ref()->domElementNamespace() function#2516

Open
stloyd wants to merge 6 commits into
flow-php:1.xfrom
stloyd:feature/task-2514
Open

Add a new ref()->domElementNamespace() function#2516
stloyd wants to merge 6 commits into
flow-php:1.xfrom
stloyd:feature/task-2514

Conversation

@stloyd

@stloyd stloyd commented Jul 8, 2026

Copy link
Copy Markdown
Member

Resolves: #2514

Change Log


Added

  • Add a new `ref()->domElementNamespace()` function
  • Add support for a new `\Dom\XmlDocument` (PHP 8.4+) in XML handling

Fixed

Changed

Removed

Deprecated

Security

@stloyd stloyd requested a review from norberttech as a code owner July 8, 2026 15:46
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.96%. Comparing base (220cf27) to head (55b0cc1).

Additional details and impacted files
@@             Coverage Diff              @@
##                1.x    #2516      +/-   ##
============================================
- Coverage     85.97%   85.96%   -0.02%     
- Complexity        0    22258   +22258     
============================================
  Files          1662     1663       +1     
  Lines         68370    68406      +36     
============================================
+ Hits          58784    58808      +24     
- Misses         9586     9598      +12     
Components Coverage Δ
etl 88.55% <71.42%> (-0.07%) ⬇️
cli 89.40% <ø> (ø)
lib-array-dot 81.44% <ø> (ø)
lib-azure-sdk 64.44% <ø> (ø)
lib-doctrine-dbal-bulk 93.61% <ø> (ø)
lib-filesystem 85.97% <ø> (ø)
lib-types 90.16% <100.00%> (-0.02%) ⬇️
lib-parquet 70.10% <ø> (ø)
lib-parquet-viewer 82.26% <ø> (ø)
lib-snappy 89.38% <ø> (-0.45%) ⬇️
lib-dremel 0.00% <ø> (ø)
lib-postgresql 88.62% <ø> (ø)
lib-telemetry 86.58% <ø> (ø)
bridge-filesystem-async-aws 92.74% <ø> (ø)
bridge-filesystem-azure 90.45% <ø> (ø)
bridge-monolog-http 96.82% <ø> (ø)
bridge-monolog-telemetry 94.79% <ø> (ø)
bridge-openapi-specification 92.07% <ø> (ø)
symfony-http-foundation 78.57% <ø> (ø)
bridge-psr18-telemetry 100.00% <ø> (ø)
bridge-psr3-telemetry 98.95% <ø> (ø)
bridge-psr7-telemetry 100.00% <ø> (ø)
bridge-telemetry-otlp 90.41% <ø> (ø)
bridge-symfony-http-foundation-telemetry 92.85% <ø> (ø)
bridge-symfony-filesystem-bundle 90.66% <ø> (ø)
bridge-symfony-filesystem-cache 98.18% <ø> (ø)
bridge-symfony-postgresql-bundle 93.39% <ø> (ø)
bridge-symfony-postgresql-cache 94.41% <ø> (ø)
bridge-symfony-postgresql-messenger 98.80% <ø> (ø)
bridge-symfony-postgresql-session 93.65% <ø> (ø)
bridge-symfony-telemetry-bundle 90.23% <ø> (ø)
adapter-chartjs 84.05% <ø> (ø)
adapter-csv 91.43% <ø> (ø)
adapter-doctrine 90.79% <ø> (ø)
adapter-google-sheet 99.18% <ø> (ø)
adapter-http 72.34% <ø> (ø)
adapter-json 88.71% <ø> (ø)
adapter-logger 50.00% <ø> (ø)
adapter-parquet 77.70% <ø> (ø)
adapter-text 74.13% <ø> (ø)
adapter-xml 83.40% <ø> (ø)
adapter-avro 0.00% <ø> (ø)
adapter-excel 94.21% <ø> (ø)
adapter-postgresql 91.06% <ø> (ø)
adapter-seal 85.42% <ø> (ø)
bridge-phpunit-postgresql 75.30% <ø> (ø)
bridge-phpunit-telemetry 87.32% <ø> (ø)
bridge-phpstan-types 0.00% <ø> (ø)
bridge-postgresql-valinor 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/core/etl/src/Flow/ETL/Function/DOMElementNamespaceValue.php
@github-actions github-actions Bot added size: M and removed size: S labels Jul 9, 2026
Comment on lines +157 to +161
if ($this->value instanceof XMLDocument) {
$serialized = $this->value->saveXml($this->value->documentElement);
} else {
// @mago-ignore analysis:possibly-invalid-argument,possibly-invalid-argument
$serialized = $this->value->saveXML($this->value->documentElement);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mago has a problem holding the Dom object type, even with an instance of pointing to its new or old version.

$serialized = $ownerDocument->saveXML($this->value);
if ($ownerDocument instanceof XMLDocument) {
// @mago-ignore analysis:possibly-invalid-argument
$serialized = $ownerDocument->saveXml($this->value);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In official docs, this method is not documented, but it's visible in the official stub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal]: New function for XML: DOM element namespace

1 participant